
import { useQuasar } from '@teld/q-components';
export const useIcon = (mappingProps) => {
  const $q = useQuasar();
  if(mappingProps.mappingProps.readonly) return ''
  if (
    mappingProps.icon &&
    mappingProps.icon.indexOf('fas dx-icon') != -1
  ) {
    return (
      <i
        style='font-size:14px'
        class={mappingProps.icon}
        onClick={mappingProps.InputFocus}
      ></i>
    );
  } else {
    return (
      <i
        style={`font-size:14px;    color: rgba(0, 0, 0, .56);font-size:${!($q.screen.xs || $q.platform.is.mobile) ? '10px' : '14px'};transform:${!($q.screen.xs || $q.platform.is.mobile) ? ' rotate(0deg);' : ' rotate(270deg);'}`}
        class={`${TComponents?.IconList?.common??'fas dx-icon'} ${TComponents?.IconList?.arrowDown??'icon-t-arrow-down'}`}
        onClick={mappingProps.InputFocus}
      ></i>
    );
  }
}
